//
// Created by grg on 2020/8/3.
// Copyright (c) 2020 龚任根. All rights reserved.
//

#ifndef TEST_CPP_PROJECT_GAMEWINDOWCONFIG_H
#define TEST_CPP_PROJECT_GAMEWINDOWCONFIG_H

#include "string"
#include "SDLWindowComponent.h"

using namespace std;

static SDLWindowComponent *gContext;
const int MIN_FRAME_TIME = 60;

//键盘 event
//case SDL_KEYDOWN:
//                    cout << event.key.keysym.sym << endl;
//                    switch (event.key.keysym.sym) {
//                        case SDLK_w:
//                            break;
//                        case SDLK_s:
//                            break;
//                        case SDLK_a:
//                            break;
//                        case SDLK_d:
//                            break;
//                        default:
//                            break;
//                    }
//                    break;

//鼠标
//case SDL_MOUSEBUTTONDOWN:
//                    switch (event.button.button) {
//                        case SDL_BUTTON_LEFT:
//                            cout << "👈" << endl;
//                            break;
//                        case SDL_BUTTON_RIGHT:
//                            cout << "👉" << endl;
//                            break;
//
//                        default:
//                            break;
//                    }
//                    break;

// 鼠标移动
//
//            case SDL_MOUSEMOTION:
//                targetRect.x = event.motion.x - targetRect.w /2;
//                targetRect.y = event.motion.y - targetRect.h/2;
//                break;

//};


//class GameWindowConfig {
//
//工具方法
const string ROOT_PATH = "/Users/gongrengen/AppCodeProjects/game/res/";
/**
 * 图片
 */
const string RES_IMG_PATH = ROOT_PATH+"/images/";
static const char * imagePath(const char* imageName){
    string path = RES_IMG_PATH + imageName;
    return path.c_str();
}

/**
 * 字体 ttf
 */
const string RES_PAtH_TTF = ROOT_PATH+"/ttf/";
static const char * ttfPath(const char* fileName){
    string path = RES_PAtH_TTF + fileName;
    return path.c_str();
}

/**
 * 声音 wav
 */
const string RES_PAtH_WAV = ROOT_PATH+"/music/";
static const char * musicPath(const char* fileName){
    string path = RES_PAtH_WAV + fileName;
    return path.c_str();
}

#endif //TEST_CPP_PROJECT_GAMEWINDOWCONFIG_H
